const { Http2ServerRequest } = require('http2')
const https=require('https')

//url的写法
const url='https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=wx929667f2ba45fd07&secret=c97a6e27b11b8dcb603deee17505c018'


const get1=https.get(url,(res)=>{
    res.on('data',(d)=>{
        str1=console.log(d.toString('utf-8'));
        console.log(typeof(d));
        jsond=JSON.parse(d)
        console.log(jsond.errmsg)

    });
})